<?php include("head.php"); ?>
    <div class="sui-layout">
		  <div class="sidebar">
<?php include("leftmenu.php"); ?>	  	
		  </div>
		  <div class="content">
          <p class="sui-text-xxlarge my-padd">班级列表</p>
          <table class="sui-table table-primary">
                <tr><th>班号</th><th>班长</th><th>教室</th><th>班主任</th><th>班级口号</th><th>操作</th></tr>
                <?php
                    include("conn.php");
                    //执行sql语句
                    $sql = "select 班号,班长,教室,班主任,班级口号 from 班级";
                    $result = mysqli_query($conn,$sql);
                    if( mysqli_num_rows($result)>0 ){
                        while ($arr = mysqli_fetch_assoc($result)){
                            echo "<tr>
                                <td>{$arr['班号']}</td>
                                <td>{$arr['班长']}</td>
                                <td>{$arr['教室']}</td>
                                <td>{$arr['班主任']}</td>
                                <td>{$arr['班级口号']}</td>
                                <td>
                                    <a class='sui-btn btn-small btn-warning' href='banji-edit.php?kid={$arr['班号']}'>修改</a>
                                    <a class='sui-btn btn-small btn-warning' href='banji-del.php?kid={$arr['班号']}'>删除</a>
                                </td>
                            </tr>";
                        }
                    }else{
                        echo "暂没有记录";
                    }
                ?>
            </table>
		  </div>
		</div>		
    </div>
<?php include("foot.php"); ?>